Uploaded image for project: 'logback'
  1. logback
  2. LOGBACK-469

stop() method is not called on TurboFilter when shutdownAndReset is performed.

    XMLWordPrintable

Details

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major Major
    • 0.9.15
    • 0.9.11
    • logback-classic
    • None
    • Windows xp.

    Description

      I use the following code to initialize and reload logback configuration :
      LoggerContext lc = (LoggerContext) LoggerFactory.getILoggerFactory();
      JoranConfigurator configurator = new JoranConfigurator();
      configurator.setContext(lc);
      lc.shutdownAndReset();
      configurator.doConfigure(logFile);

      I have a turbofilter that needs to do some stuff when stopped. Though, the stop() method is not called in that case. So I added the following code before the shutdownandreset :
      TurboFilter tbf = lc.getFirstTurboFilter();
      while(tbf != null)

      { tbf.stop(); tbf = tbf.getNext(); }

      This is the only workaround I found. Is there any way to do better ?

      Attachments

        Activity

          People

            ceki Ceki Gülcü
            morillo alexis morillo
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: